package com.fc.dto.pageQuery;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Objects;

@EqualsAndHashCode(callSuper = true)
@Data
public class AttendancePageQueryDTO extends PageQueryDTO {
    private Long driverId;
    private Integer clockType;
    private LocalDateTime startTime;
    private LocalDateTime endTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AttendancePageQueryDTO that = (AttendancePageQueryDTO) o;
        return Objects.equals(driverId, that.driverId) && Objects.equals(clockType, that.clockType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), driverId, clockType);
    }
}
